package com.tencent.smtt.sdk;

import android.content.pm.ApplicationInfo;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public class bo implements android.webkit.DownloadListener {
    final /* synthetic */ DownloadListener a;
    final /* synthetic */ WebView b;

    /* JADX INFO: Access modifiers changed from: package-private */
    public bo(WebView webView, DownloadListener downloadListener) {
        this.b = webView;
        this.a = downloadListener;
    }

    @Override // android.webkit.DownloadListener
    public void onDownloadStart(String str, String str2, String str3, String str4, long j) {
        DownloadListener downloadListener = this.a;
        if (downloadListener != null) {
            downloadListener.onDownloadStart(str, str2, str3, str4, j);
            return;
        }
        ApplicationInfo applicationInfo = this.b.i == null ? null : this.b.i.getApplicationInfo();
        if (applicationInfo == null || !TbsConfig.APP_WX.equals(applicationInfo.packageName)) {
            com.tencent.smtt.sdk.a.d.a(this.b.i, str, null, null);
        }
    }
}
